package com.peng.leetcode.list;

/**
 * PrintListNode
 *
 * @author: lupeng6
 * @create: 2020/12/31 14:31
 */
public class PrintListNode {

    public static void print(ListNode head) {
        if (head == null) {
            return;
        }
        ListNode current = head;
        while (current != null) {
            System.out.println(current.val);
            current = current.next;
        }
    }
}
